package com.zgjkhis.modules.enums;

import lombok.Getter;

@Getter
public enum WarehousingStatusEnum {
	/**
	 * @Author yzq
	 * @Description 待提交
	 * @Date 2021/9/14 15:12
	 * @Param
	 * @return
	 **/
	DSH(1, "待提交"),
	/**
	 * @Author yzq
	 * @Description 已审核
	 * @Date 2021/9/14 15:12
	 * @Param
	 * @return
	 **/
	YSH(2, "待审核"),
	/**
	 * @Author yzq
	 * @Description 已入库
	 * @Date 2021/9/14 15:12
	 * @Param
	 * @return
	 **/
	YRK(3, "已入库"),
	/**
	 * @Author yzq
	 * @Description 已取消
	 * @Date 2021/9/14 15:12
	 * @Param
	 * @return
	 **/
	YBH(4, "已驳回"),
	/**
	 * 已取消
	 */
	YQX(5, "已取消"),

	YISH(6, "已审核"),

	DRK(7, "待入库"),



	;

	private final Integer code;

	private final String value;

	WarehousingStatusEnum(Integer code, String value) {
		this.code = code;
		this.value = value;
	}

	public static String findByCode(Integer code) {
		for (WarehousingStatusEnum drugTypeEnum : WarehousingStatusEnum.values()) {
			if (drugTypeEnum.getCode().equals(code)) {
				return drugTypeEnum.value;
			}
		}
		return "其他";
	}
	public static Integer findByValue(String value) {
		for (WarehousingStatusEnum drugTypeEnum : WarehousingStatusEnum.values()) {
			if (drugTypeEnum.getValue().equals(value)) {
				return drugTypeEnum.code;
			}
		}
		return 2;
	}

}
